<template>
  <div>
    <check-header></check-header>
    <check-project-list></check-project-list>
  </div>
</template>

<script>
import Cookies from 'js-cookie'
import CheckHeader from './components/header'
import CheckProjectList from './components/list'
export default {
  name: 'index',
  components: {CheckProjectList, CheckHeader},
  mounted () {
    this.judge()
  },
  methods: {
    judge () {
      if (!Cookies.get('id')) {
        this.$router.push('/loginError')
      } else if (parseInt(Cookies.get('level')) !== this.PI) {
        this.$router.push('/noGrant')
      }
    }
  }
}
</script>

<style scoped>

</style>
